import request from '@/utils/request'

export function getRoleList(query) {
  return request({
    url: '/admin/role/list',
    method: 'get',
    params: query
  })
}

export function getAllRole() {
  return request({
    url: '/admin/role/all',
    method: 'get',
    params: {}
  })
}


export function addRole(data) {
  return request({
    url: '/admin/role/add',
    method: 'post',
    data
  })
}

export function editRole(data) {
  return request({
    url: '/admin/role/edit',
    method: 'post',
    data
  })
}

export function deleteRole(data) {
  return request({
    url: '/admin/role/delete',
    method: 'post',
    data
  })
}
